import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'
import router from './router'
import { loadAllPlugins } from './plugins'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import './permission'
import './styles/index.scss'
import 'element-plus/dist/index.css'

import './theme/index.scss'

const app = createApp(App)
const pinia = createPinia()

loadAllPlugins(app)

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

app
  .use(pinia)
  .use(router)
  .mount('#app')

console.log(app.config)
